<html>
<head><meta charset="utf-8"><title>New &quot;reached the type-length limit&quot; errors in nightly 202... · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/New.20.22reached.20the.20type-length.20limit.22.20errors.20in.20nightly.20202.2E.2E.2E.html">New &quot;reached the type-length limit&quot; errors in nightly 202...</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="207460727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/New%20%22reached%20the%20type-length%20limit%22%20errors%20in%20nightly%20202.../near/207460727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> teor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/New.20.22reached.20the.20type-length.20limit.22.20errors.20in.20nightly.20202.2E.2E.2E.html#207460727">(Aug 19 2020 at 20:56)</a>:</h4>
<p>Starting in nightly 2020-08-14, we're getting new "reached the type-length limit" errors in our project:<br>
<a href="https://github.com/ZcashFoundation/zebra/issues/923">https://github.com/ZcashFoundation/zebra/issues/923</a></p>
<p>It's hard to find the specific types that are causing the issue, because they are abbreviated in rustc's output. But we make heavy use of futures and async code, including tracing. So the issue is probably related to:<br>
<a href="https://github.com/tokio-rs/tracing/issues/616">https://github.com/tokio-rs/tracing/issues/616</a><br>
<a href="https://github.com/rust-lang/rust/issues/54540">https://github.com/rust-lang/rust/issues/54540</a></p>
<p>How do I create a rustc bug?<br>
How can I find a minimal test case?<br>
How do I find the exact rustc commit responsible?<br>
(I know it's between nightly 2020-08-13 and nightly 2020-08-14 from rustup.)</p>
<p>I'm happy to read the relevant guides, if they are available.</p>



<a name="207460794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/New%20%22reached%20the%20type-length%20limit%22%20errors%20in%20nightly%20202.../near/207460794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/New.20.22reached.20the.20type-length.20limit.22.20errors.20in.20nightly.20202.2E.2E.2E.html#207460794">(Aug 19 2020 at 20:57)</a>:</h4>
<blockquote>
<p>How do I find the exact rustc commit responsible?</p>
</blockquote>
<p><a href="https://github.com/rust-lang/cargo-bisect-rustc/blob/master/TUTORIAL.md">https://github.com/rust-lang/cargo-bisect-rustc/blob/master/TUTORIAL.md</a></p>



<a name="207460907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/New%20%22reached%20the%20type-length%20limit%22%20errors%20in%20nightly%20202.../near/207460907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/New.20.22reached.20the.20type-length.20limit.22.20errors.20in.20nightly.20202.2E.2E.2E.html#207460907">(Aug 19 2020 at 20:58)</a>:</h4>
<p>if there's an existing rustc bug I wouldn't open a new one, just comment on <a href="https://github.com/rust-lang/rust/issues/54540">https://github.com/rust-lang/rust/issues/54540</a>.</p>



<a name="207460916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/New%20%22reached%20the%20type-length%20limit%22%20errors%20in%20nightly%20202.../near/207460916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/New.20.22reached.20the.20type-length.20limit.22.20errors.20in.20nightly.20202.2E.2E.2E.html#207460916">(Aug 19 2020 at 20:58)</a>:</h4>
<p>helps keep the discussion in one place</p>



<a name="207469791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/New%20%22reached%20the%20type-length%20limit%22%20errors%20in%20nightly%20202.../near/207469791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> teor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/New.20.22reached.20the.20type-length.20limit.22.20errors.20in.20nightly.20202.2E.2E.2E.html#207469791">(Aug 19 2020 at 22:40)</a>:</h4>
<p>Our project was using nested instrument proc macro spans from tracing, so we can fix the issue on our end by removing redundant spans.</p>
<p>I'll update the bug report in rustc after the bisect finishes, because it might be an unintended regression. (And the tracing bug, because they might want to know.)</p>



<a name="207473903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/New%20%22reached%20the%20type-length%20limit%22%20errors%20in%20nightly%20202.../near/207473903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> teor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/New.20.22reached.20the.20type-length.20limit.22.20errors.20in.20nightly.20202.2E.2E.2E.html#207473903">(Aug 19 2020 at 23:34)</a>:</h4>
<p>The regression was caused by a rustc fix, so I added a comment to that issue: <a href="https://github.com/rust-lang/rust/issues/75313#issuecomment-676806992">https://github.com/rust-lang/rust/issues/75313#issuecomment-676806992</a></p>
<p>Thanks <span class="user-mention" data-user-id="232545">@Joshua Nelson</span> !</p>



<a name="207474022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/New%20%22reached%20the%20type-length%20limit%22%20errors%20in%20nightly%20202.../near/207474022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> teor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/New.20.22reached.20the.20type-length.20limit.22.20errors.20in.20nightly.20202.2E.2E.2E.html#207474022">(Aug 19 2020 at 23:36)</a>:</h4>
<p>(Oh, and there is an existing minimal test case in <a href="https://github.com/tokio-rs/tracing/issues/616">https://github.com/tokio-rs/tracing/issues/616</a> . rustc used to need 5 layers of recursion to trigger the error, but we're seeing it with 4 layers in recent nightlies.)</p>



<a name="207476891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/New%20%22reached%20the%20type-length%20limit%22%20errors%20in%20nightly%20202.../near/207476891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/New.20.22reached.20the.20type-length.20limit.22.20errors.20in.20nightly.20202.2E.2E.2E.html#207476891">(Aug 20 2020 at 00:18)</a>:</h4>
<p>no problem :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>